<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>图书管理</title>
    <link rel="stylesheet" href="../layui/css/layui.css"/>
    <link rel="stylesheet" href="../font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>
<h2>图书管理</h2>
<div>
    <div id="topbar">
        <button type="button" onclick="editBook()" class="layui-btn layui-btn-cyan"><i class="fa fa-edit"></i>修改</button>
        <button type="button" onclick="removeBook()" class="layui-btn layui-btn-danger"><i class="fa fa-remove"></i>删除</button>
        <button type="button" onclick="exportExcel()" class="layui-btn layui-btn-green">导出</button>
        <div class="layui-input-inline">
            <input type="text" name="searchPutbookName" class="layui-input" placeholder="请输入书名" autocomplete="off" class="layui-input" style="margin-left: 40px;width: 200px; margin-right: 0px">
        </div>
        <button class="layui-btn" onclick="searchOutBook()"><i class="fa fa-search"></i></button>
        <div class="layui-input-inline">
            <input type="text" name="searchSuppName" class="layui-input" placeholder="请输入供货商" autocomplete="off" class="layui-input" style="margin-left: 40px;width: 200px; margin-right: 0px">
        </div>
        <button class="layui-btn" onclick="searchOutBook()"><i class="fa fa-search"></i></button>
    </div>
    <div id="editBookModel" style="display: none">
        <form id="editBookForm" class="layui-form layui-form-pane">
            <input type="hidden" name="putbookId"/>
            <div class="layui-form-item" pane>
                <label class="layui-form-label">书名</label>
                <div class="layui-input-block">
                    <input type="text" name="putbookName" required  lay-verify="checkPutBookName" placeholder="请输入书名" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item" pane>
                <label class="layui-form-label">供货商</label>
                <div class="layui-input-block">
                    <input type="text" name="suppName" required  lay-verify="checkSuppName" placeholder="请输入供货商" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item" pane>
                <label class="layui-form-label">库存</label>
                <div class="layui-input-block">
                    <input type="text" name="putbookNum" required  lay-verify="checkPutbookNum" placeholder="请输入库存" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item" pane>
                <label class="layui-form-label">区域</label>
                <div class="layui-input-block">
                    <input type="text" name="areaName" required  lay-verify="checkAreaName" placeholder="请输入区域" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item" align="center">
                <button class="layui-btn" lay-submit lay-filter="updateBookBtn">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </form>

    </div>
    <div>
        <table id="demo" lay-filter="test"></table>
    </div>
</div>
</body>
<script type="text/javascript" src="../layui/layui.all.js"></script>
<script src="../js/booksStorage.js"></script>
</html>